// 引入 react 依赖
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { Text, View, Image, TouchableOpacity, ImageBackground, ScrollView, InteractionManager } from 'react-native';

// 引入第三方依赖
import _ from 'lodash';
import pureRender from 'pure-render-decorator';
import { Actions } from 'react-native-router-flux';
import Icon from 'react-native-vector-icons/Ionicons';

// antd 按需加载
import { Tabs, Toast, Portal, List, Switch, Checkbox, WhiteSpace } from '@ant-design/react-native';
const Item = List.Item;
const Brief = Item.Brief;

// 引入 处理数据 所需文件
import { } from '../../module/module.js'

// 引入样式
import Style from './style/style.js';

// 引入公用组件
import { Status, NavBar, CacheImage } from '../../components/index.js'

// 引入专用组件
import { } from './components'

// 引入工具包
import { } from '../../util/images.js';
import { press, size, ScreenWidth, pathHead , defaultDataList,onEndReached,onRefresh ,concatDataList,defaultPage} from '../../util/utils.js'

class UserInfo extends Component {

  constructor(props) {
    super(props)
    this.state = {

    }
  }


  componentDidMount() {

  }


  render() {
    const { user } = this.props
    return (
      <View style={Style.container}>
        <Status />
        <NavBar
          title="个人中心"
          back={true}
        />
        <ScrollView style={Style.content}>
          <List>
            <Item extra={'修改头像'} arrow="empty">
              <CacheImage
                resizeMod={"contain"}
                style={{
                  width: 30,
                  height: 30,
                  borderRadius: 15,
                  overflow: 'hidden',
                }}
                source={{ uri: `${pathHead}${user.avatar}` }}
                
              />
            </Item>
            <Item extra={user.nickname} arrow="empty">昵称</Item>
            <Item extra={user.gender} arrow="empty">性别</Item>
            <Item extra={user.brief} arrow="empty">简介</Item>
            <Item extra={user.nickname} arrow="empty">手机号</Item>
            <Item arrow="horizontal">修改密码</Item>
          </List>
        </ScrollView>
      </View >
    );
  }
}


export default connect(({ user, userInfo }) => ({
  user, userInfo
}))(pureRender(UserInfo))
